package com.mytest.service.impl;

import com.mytest.mapper.ProductTypeMapper;
import com.mytest.pojo.ProductType;
import com.mytest.pojo.ProductTypeExample;
import com.mytest.service.productTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @BelongsProject: java-85-course-code
 * @BelongsPackage: com.mytest.service.impl
 * @Author: LiTongMiao
 * @Date: 2022/2/7 15:33
 * @Description: 获取商品类型
 */
@Service("ProductTypeServiceImpl")
public class ProductTypeServiceImpl implements productTypeService {
    //在业务逻辑层一定有数据访问层
    @Autowired
    ProductTypeMapper productTypeMapper;

    //这里放到了监听器里面
    @Override
    public List<ProductType> getAll() {

        return productTypeMapper.selectByExample(new ProductTypeExample());
    }
}
